﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class News : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Time.Text = DateTime.Now.ToString();
        }

        protected void Submit_Click(object sender, EventArgs e)
        {
            if (Input.Text.Equals(""))
            {
                Error.Text = "请输入新闻内容！";
            }
            else
            {
                Thanks.Text = $"此新闻来自 {Source.SelectedValue} 谢谢您提交的新闻!";
            }
        }

        protected void Reset_Click(object sender, EventArgs e)
        {
            Input.Text = "";
        }
    }
}